home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Hot Mix 14
/
Hot Mix 14.iso
/
HTML
/
vendors
/
finesse
/
examples
/
sh
/
fslearn
< prev
next >
Wrap
Text File
|
1996-06-27
|
7KB
|
260 lines
#!/bin/sh
# FINESSEAPPLICATIONKEY sKqUrjOmjoAmE
#
. ${FINESSEPATH-/usr/local/finesse}/fsshinit
show()
{
n=1
while :
do
if [ $n -gt 4 ] ; then
n=4
fi
a="win$n"
if [ "$n" != "1" -a "$fsbutton" != "info" ] ; then
Fsecho -e
Fsecho ' '
Fsecho "Currently displaying window: $n"
Fsecho ' '
Fsecho "Press info button for more information."
fi
$a
if [ "$fsbutton" = "about" ] ; then
aboutfinesse
fi
if [ "$fsbutton" = "info" ] ; then
info$a
fi
if [ "$fsbutton" = "continue" ] ; then
n=`expr $n + 1`
fi
if [ "$fsbutton" = "back" ] ; then
n=`expr $n - 1`
fi
if [ "$fsbutton" = "exit" ] ; then
Fsclose
exit 0
fi
done
}
win0()
{
n=1
win1
}
win1()
{
windef1="
FsWindow -title 'Finesse Demo 1'
-name windef1;
FsSeparator;
FsForm -name form1 -orientation vertical;
FsLabel -parent form1 -name lt1 -label 'Finesse 4.x' ;
FsLabel -parent form1 -label 'New features and introduction.' ;
FsLabel -parent form1 -label '' ;
FsLabel -parent form1 -label 'Please read the comments in the echo window' ;
FsLabel -parent form1 -label 'which will appear if you press the Continue button.' ;
FsSeparator;
FsPushButton -label Continue -fsbutton continue -winstat close;
FsPushButton -label Exit -fsbutton exit -winstat close;
FsPushButton -label 'About Finesse' -fsbutton about -winstat touch;"
Fsdisplay -m FINESSEDEMO -w "$windef1" -n windef1
}
infowin1()
{
Fsecho -e
Fsecho -p beginning -t 'Information for window 1
========================================
'"$windef1"
}
win2()
{
windef2=
windef2="
FsWindow -title 'Finesse Demo 2'
-name windef2;
FsSeparator;
FsForm -name formB1 -orientation vertical;
FsForm -parent formB1 -name formB11 -orientation horizontal;
FsForm -parent formB1 -name formB12 -orientation horizontal;
FsLabel -parent formB11 -label Form11 ;
FsLabel -parent formB12 -label Form12 ;
FsSeparator;
FsPushButton -label Continue -fsbutton continue -winstat close;
FsPushButton -label Back -fsbutton back -winstat close;
FsPushButton -label Info -fsbutton info -winstat touch;
FsPushButton -label Exit -fsbutton exit -winstat close;"
Fsdisplay -m FINESSEDEMO -w "$windef2" -n windef2
}
infowin2()
{
Fsecho -e
Fsecho -p beginning -t 'Information for window 2
========================================
Finesse allows you to partition a window into forms.
Each form may be a container for further objects,
like buttons, labels, check boxes, etc.
A form
* can contain other forms
* has an orientation which describes how
elements are aligned within this form
In this window we build two subareas:
Form11
Form12
The colors are defined in a resource file. There
the different objects are referenced by the
name you defined in the window declaration.
The name of Form12 is formb11, the name of
Form12 is formb12.
The windowdefinition is as follows:
'"$windef2"
}
win3()
{
windef3=
windef3="
FsWindow -title 'Finesse Demo 3'
-name windef3;
FsSeparator;
FsForm -name form1 -orientation vertical;
FsForm -parent form1 -name form11 -orientation horizontal;
FsForm -parent form1 -name form12 -orientation horizontal;
FsForm -parent form11 -name form111 -orientation vertical;
FsForm -parent form11 -name form112 -orientation vertical;
FsLabel -parent form111 -label Form111 ;
FsLabel -parent form112 -label Form112 ;
FsLabel -parent form12 -label Form12 ;
FsSeparator;
FsPushButton -label Continue -fsbutton continue -winstat close;
FsPushButton -label Back -fsbutton back -winstat close;
FsPushButton -label Info -fsbutton info -winstat touch;
FsPushButton -label Exit -fsbutton exit -winstat close;"
Fsdisplay -m FINESSEDEMO -w "$windef3" -n windef3
}
infowin3()
{
Fsecho -e
Fsecho -p beginning -t 'Information for window 3
========================================
This window shows 3 form areas in different colors.
We have separated the upper form into two parts:
Form11 : Form111
Form112
Now we have three forms, which will be filled
by some obejcts in the next frame.
The window definition is:
'"$windef3"
}
win4()
{
windef4=
windef4="
FsWindow -title 'Finesse Demo 4'
-name windef4;
FsSeparator;
FsForm -name form41 -orientation vertical;
FsForm -parent form41 -packing tight -name form411 -orientation horizontal;
FsForm -parent form41 -packing tight -name form412 -orientation horizontal;
FsForm -parent form411 -packing tight -name form4111 -orientation vertical;
FsForm -parent form411 -packing tight -name form4112 -orientation vertical;
FsSeparator;
FsPushButton -label Continue -fsbutton continue -winstat close;
FsPushButton -label Back -fsbutton back -winstat close;
FsPushButton -label Info -fsbutton info -winstat touch;
FsPushButton -label Exit -fsbutton exit -winstat close;
FsCheck -parent form4111 -name check1 -nrows 3 -label 'Check Box'
-var chk1==Germany -items 'U.S.A. Germany Japan' ;
FsPushButton -parent form4111 -winstat touch -name but1 -nrows 2 -label Button2 ;
FsPushButton -parent form4111 -winstat touch -name but2 -label Button1 ;
FsLabel -parent form4112 -label 'Label for List' -name lab1 ;
FsList -parent form4112 -name list1 -nvisible 5
-items 'List: Train Car Airplane Rocket Bike Bus' -var listvar1 ;
FsText -parent form4112 -name text2 -label 'Text widget 2' -var vtext2 ;
FsText -parent form412 -name text1 -packing tight
-label 'Text widget 1' -var vtext1 ;
FsRadio -parent form412 -name rad1 -var vrad1 -nrows 1 -items 'Chicago Dallas Berlin' ;
"
Fsdisplay -m FINESSEDEMO -w "$windef4" -n windef4
}
infowin4()
{
Fsecho -e
Fsecho -t 'Information for window 4
========================================
In this window a lot of different types of Finesse
objects are displayed. The three colors indicate
the corresponding parent form.
The window description is:
'"$windef4" -p beginning
}
aboutfinesse()
{
aboutwin="
FsWindow -title 'About Finesse'
-name aboutfinesse;
FsSeparator;
FsForm -name aboutform -orientation vertical;
FsLabel -parent aboutform -name a1 -label 'Finesse' ;
FsLabel -parent aboutform -name a2 -label 'is a product of science + computing GmbH, Germany' ;
FsLabel -parent aboutform -name a4 -label 'copyright by s+c, 1996' ;
FsSeparator;
FsPushButton -label Continue -fsbutton continuedemo -winstat close;
"
Fsdisplay -m FINESSE -w "$aboutwin" -n aboutfinesse
}
Fsopen "$@"
show
Fssave
Fsclose